package com.aerospace;

import com.aerospace.control.MainControl;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.layout.Pane;
import javafx.scene.text.Font;
import javafx.stage.Stage;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;

public class MainPlayer extends Application {

    private static Logger Log = Logger.getLogger(MainPlayer.class);

    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage primaryStage) {
//        primaryStage.setScene(new Scene(new Pane(),640,480));
//        primaryStage.show();
        MainControl main = new MainControl(primaryStage);
        main.init();
    }

    /**
     * 初始化游戏字体
     */
    @Override
    public void init() {
        try {
            Font.loadFont(getClass().getResourceAsStream("ClearSans-Bold.ttf"), 10.0);
            Log.info("系统字体加载完成");
        }catch (Exception e){
            e.printStackTrace();
        }
    }
}
